from django.shortcuts import render
from .models import *
from django.http import HttpRequest,HttpResponse,JsonResponse,HttpResponseRedirect
from django.views.decorators.http import require_http_methods
from django.views.decorators.csrf import csrf_exempt
from django.core import serializers
from django.db import connection
from lxml import etree
from fdcl.settings import BASE_DIR,WEIXIN_MP
from django.contrib.auth.decorators import login_required

import json,subprocess,datetime,time,os,requests,hashlib,random,ssl,csv,re

import fdcl.settings
from django.contrib.auth import authenticate, login,logout

from qcloudsms_py import SmsSingleSender
from qcloudsms_py.httpclient import HTTPError
from urllib.parse import quote,unquote

from Crypto.Cipher import AES
from Crypto.Util.Padding import pad,unpad
from base64 import b64encode,b64decode

from django.core.exceptions import ObjectDoesNotExist


# Create your views here.


@csrf_exempt
@login_required
def index(request):
    #url = "/fdcl_uni_app/unpackage/dist/build/h5/index.html"
    url = os.path.join(BASE_DIR,"manghe/makefriend/dist/index.html")
    f = open(url)
    c = f.read()
    return HttpResponse(c,content_type="text/html")
